.sidebar {
  width: 280px;
  height: calc(100vh - 60px);
  background-color: white;
  border-right: 1px solid #E2E8F0;
  position: fixed;
  top: 60px;
  left: 0;
  overflow-y: auto;
  transition: all 0.3s ease;
  z-index: 999;
}

.sidebar.collapsed {
  width: 50px;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #E2E8F0;
}

.sidebar-title {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #2D3748;
  margin: 0;
  padding-left: 3px;
  border-left: 3px solid #4299E1;
}

.collapse-btn {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #718096;
}

.connection-form {
  padding: 16px;
  border-bottom: 1px solid #E2E8F0;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #2D3748;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.form-control:focus {
  border-color: #4299E1;
  outline: 0;
}

.form-actions {
  display: flex;
  gap: 10px;
}

.btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.connect-btn {
  background-color: #4299E1;
  color: white;
}

.connect-btn:hover:not(:disabled) {
  background-color: #3182CE;
}

.connect-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.disconnect-btn {
  background-color: #E2E8F0;
  color: #2D3748;
}

.disconnect-btn:hover {
  background-color: #CBD5E0;
}

.indices-section {
  padding: 16px;
}

.indices-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.indices-header .sidebar-title {
  margin: 0;
}

.indices-actions {
  display: flex;
  gap: 5px;
}

.refresh-btn, .delete-index-btn, .create-index-btn {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #718096;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-weight: bold;
}

.refresh-btn:hover:not(:disabled), 
.delete-index-btn:hover, 
.create-index-btn:hover {
  background-color: #F7FAFC;
}

.delete-index-btn {
  font-size: 20px;
}

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #718096;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #E2E8F0;
  border-top: 2px solid #4299E1;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.indices-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.index-card {
  background-color: white;
  border: 1px solid #E2E8F0;
  border-radius: 4px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.index-card:hover {
  background-color: #F7FAFC;
}

.index-card.selected {
  border-left: 3px solid #4299E1;
  background-color: #F7FAFC;
}

.index-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.index-name {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #2D3748;
  font-weight: 500;
}

.index-actions {
  display: flex;
  gap: 5px;
}

.edit-index-btn {
  background: none;
  border: 1px solid #4299E1;
  color: #4299E1;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 3px;
  cursor: pointer;
}

.edit-index-btn:hover {
  background-color: #4299E1;
  color: white;
}

/* Modal styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  border-radius: 8px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.delete-index-modal {
  max-width: 500px;
}

.delete-confirm-modal {
  max-width: 500px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #E2E8F0;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: #2D3748;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #718096;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.modal-close:hover {
  background-color: #F7FAFC;
}

.modal-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}

.delete-index-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 20px;
  border: 1px solid #E2E8F0;
  border-radius: 4px;
}

.index-item {
  padding: 12px 16px;
  border-bottom: 1px solid #E2E8F0;
  cursor: pointer;
  transition: all 0.2s;
}

.index-item:hover {
  background-color: #F7FAFC;
}

.index-item.selected {
  background-color: #EBF8FF;
  border-left: 3px solid #4299E1;
}

.index-item:last-child {
  border-bottom: none;
}

.delete-actions, .confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.delete-list {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 20px;
  padding-left: 20px;
}

.delete-list li {
  margin-bottom: 5px;
  color: #E53E3E;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background-color: #4299E1;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background-color: #3182CE;
}

.btn-secondary {
  background-color: #718096;
  color: white;
}

.btn-secondary:hover {
  background-color: #4A5568;
}

.btn-default {
  background-color: #EDF2F7;
  color: #4A5568;
}

.btn-default:hover {
  background-color: #E2E8F0;
}

.btn-danger {
  background-color: #E53E3E;
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background-color: #C53030;
}